package com.mlethe.library.socialtool.entity;

import android.graphics.Bitmap;

import androidx.annotation.DrawableRes;

/**
 * 分享实体
 * @author Mlethe
 */
public class Share {

    /**
     * 好友
     */
    public static final int FLAG_FRIEND = 0;
    /**
     * 朋友圈、生活圈
     */
    public static final int FLAG_MOMENTS = 1;
    /**
     * 收藏
     */
    public static final int FLAG_COLLECTION = 2;

    /**
     * 标题
     */
    private String title;
    /**
     * 描述
     */
    private String desc;
    /**
     * 本地图片路径
     */
    private String imagePath;
    /**
     * 图片二进制流
     */
    private byte[] imageData;
    /**
     * 图片URL
     */
    private String imageUrl;
    /**
     * 图片
     */
    private Bitmap bitmap;
    /**
     * 网页缩略图资源id
     */
    @DrawableRes
    private int drawableId;
    /**
     * 微信openid（可选）
     */
    private String openid;
    /**
     * 对应该请求的事务ID，通常由Req发起，回复Resp时应填入对应事务ID（支付宝和微信）
     */
    private String transaction;

    public Share(String title, String desc) {
        this.title = title;
        this.desc = desc;
    }

    public Share(String title, String desc, int drawableId) {
        this.title = title;
        this.desc = desc;
        this.drawableId = drawableId;
    }

    public Share(String title, String desc, Bitmap bitmap) {
        this.title = title;
        this.desc = desc;
        this.bitmap = bitmap;
    }

    public Share(String title, String desc, String imageUrl) {
        this.title = title;
        this.desc = desc;
        this.imageUrl = imageUrl;
    }

    public Share(String title, String desc, byte[] imageData) {
        this.title = title;
        this.desc = desc;
        this.imageData = imageData;
    }

    public String getTitle() {
        return title;
    }

    public String getDesc() {
        return desc;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public byte[] getImageData() {
        return imageData;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public Bitmap getBitmap() {
        return bitmap;
    }

    public int getDrawableId() {
        return drawableId;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getTransaction() {
        return transaction;
    }

    public void setTransaction(String transaction) {
        this.transaction = transaction;
    }
}
